package com.yxw.live_vod_backend_boot.service.impl;

import com.yxw.live_vod_backend_boot.service.FileService;
import com.yxw.live_vod_facade.dto.FileDTO;
import com.yxw.live_vod_facade.feign.FileFeignClient;
import com.yxw.live_vod_facade.vo.YxFileVo;
import com.yxw.yxnet_cd_center.common.utils.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
@Repository
public class FileServiceImpl implements FileService {

    @Autowired
    private FileFeignClient fileFeignClient;

    @Override
    public BaseResult<List<YxFileVo>> uploadFile(MultipartFile[] multipartFiles, Long objId, Integer classify, String remark) {
        return fileFeignClient.uploadFile(multipartFiles, objId, classify, remark);
    }

    @Override
    public BaseResult<Boolean> deleteFile(FileDTO dto) {
        return fileFeignClient.deleteFile(dto);
    }

    @Override
    public BaseResult<String> downloadFile(FileDTO dto) {
        return fileFeignClient.downloadFile(dto);
    }

    @Override
    public BaseResult<List<YxFileVo>> getFileListByBussId(Long bussId) {
        return fileFeignClient.getFileListByBussId(bussId);
    }
}
